package com.czh.subject.infra.basic.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.czh.subject.infra.basic.mapper.AuthPermissionMapper;
import com.czh.subject.infra.basic.entity.AuthPermission;
import com.czh.subject.infra.basic.service.AuthPermissionService;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * (AuthPermission)表服务实现类
 *
 * @author caozaihui
 * @since 2024-07-23 18:05:27
 */
@Service("authPermissionService")
public class AuthPermissionServiceImpl extends ServiceImpl<AuthPermissionMapper, AuthPermission> implements AuthPermissionService {

        /** 
         * 
         * @param  id 主键
         * @author caozaihui  
         * @description //TODO  通过ID查询单条数据
         * @date 2024-07-23 18:05:27
         * @return 实例对象
         */
        @Override
        public AuthPermission selectAuthPermissionById (Long id) {
                LambdaQueryWrapper<AuthPermission> authPermissionlam =  new LambdaQueryWrapper<>();
                authPermissionlam.eq(AuthPermission ::getId ,id);
                return getOne(authPermissionlam);
        }

        
        /**
         *
         * @param idList 主键
         * @author caozaihui 
         * @description //TODO    通过主键删除数据
         * @date 2024-07-23 18:05:27
         * @return
         */
        @Override
        public int deleteById(List<Long> idList) {
            return baseMapper.deleteByIds(idList);
        }
}

